﻿
namespace SurveySystem.Model
{
    /// <summary>
    /// Represents a single answer to a single <see cref="Question"/> in a <see cref="Survey"/>. This class defines the answers,
    /// and does not represent a response from a user. Responses are represented by the <see cref="Response"/> and 
    /// <see cref="ResponseAnswer"/> classes.
    /// </summary>
    public class Answer
    {
        /// <summary>
        /// The ID field of this Answer object
        /// </summary>
        public int AnswerID { get; set; }
        /// <summary>
        /// The ID field of the <see cref="Question"/> object to which this answer relates
        /// </summary>
        public int QuestionID { get; set; }
        /// <summary>
        /// The text of this answer
        /// </summary>
        public string AnswerText { get; set; }

        public Answer()
        {
            AnswerID = -1;
            QuestionID = -1;
            this.AnswerText = "";
        }

        public override string ToString()
        {
            return this.AnswerText;
        }
    }
}
